package com.ai3d.rfid.network.api

import com.ai3d.rfid.network.bean.ApiResponse
import com.bj.ski.base.database.EventReq

import okhttp3.MultipartBody
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*

/**
 * @ProjectName : Kolb
 * @Author : weijinsong
 * @Time : 2023/1/4 11:05
 * @Description : 账号
 */
interface AccountApi {
    @GET("tenant-center/account/registerCodeSms/{path}")
    suspend fun registerCodeSms(
        @Path("path") phoneNum: String
    ): ApiResponse<String>

    @GET("tenant-center/account/loginSms/{phoneNum}")
    suspend fun getLoginSms(
        @Path("phoneNum") phone: String
    ): ApiResponse<String>

    @GET("/tenant-center/account/forgetPasswordSms/{phone}")
    suspend fun getForgetPwdSms(@Path("phone") phone: String): ApiResponse<String>



    @GET("/oss/iot/oss/host")
    suspend fun iotHost(): ApiResponse<String>




    @GET("/production/module-auth?module=iot")
    suspend fun moduleAuth(): ApiResponse<String>

    @POST("/tenant-center/account/exit")
    suspend fun exit(): ApiResponse<String>




    @PUT("/tenant-center/enterprise/switchEnterprise")
    suspend fun switchEnterprise(@Query("tenantId") tenantId: String): ApiResponse<Boolean>

    @PUT("/tenant-center/enterprise/mainEnterprise")
    suspend fun setMainEnterprise(@Query("targetEnterpriseId") targetEnterpriseId: String): ApiResponse<Boolean>



    @POST("/oss/oss/getAuth")
    suspend fun getAuth(@Body arrays: List<String>): ApiResponse<ArrayList<String>>

    //校验是否已安装该插件
    @GET("/template-manager/plugin/checkInstall/{pluId}")
    suspend fun checkInstall(@Path("pluId") pluId: String): ApiResponse<Boolean>

    //获取客户端appId
    @GET("/template-manager/rfConfigReaderManagement/getClientAppId")
    suspend fun getClientAppId(@Query("type") type: String): ApiResponse<String>

    //停止
    @GET("/template-manager/rfConfigReaderManagement/reader/stop")
    suspend fun stop(@Query("pkId") pkId: String): ApiResponse<String>

    //单次读卡
    @GET("/template-manager/rfConfigReaderManagement/reader/once")
    suspend fun once(@Query("pkId") pkId: String): ApiResponse<String>

    //连续读卡
    @GET("/template-manager/rfConfigReaderManagement/reader/continuous")
    suspend fun continuous(@Query("pkId") pkId: String): ApiResponse<String>













    //事件上报
    @POST("/disc/app/event")
    suspend fun event(@Body eventReqs: List<EventReq>?): ApiResponse<String>

    //Vf录音上报
    @Multipart
    @POST("/disc/app/uploadvoice")
    suspend fun uploadVoice(@Part parts: MutableList<MultipartBody.Part>): ApiResponse<String>


    


}